// -*- C++ -*------------------------------------------------------------------
// $Id: Monomer.cc,v 1.2 2007-10-26 14:55:16 biocomp Exp $
//
//  Class:             Monomer
//
//  Base Class(es):    Component
//
//  Derived Class(es): -
//
//  Containing:        -
//
//  Author:            Silvio Tosatto
//
//  Project Name:      Victor
//
//  Date:              09/99
//
//  Reviewed By:       <Name>
//
//  Description:       
//
// ---------------------------------------------------------------------------

// Includes:
#include <Monomer.h>
#include <Debug.h>

// Global constants, typedefs, etc. (to avoid):

using namespace Biopool;

// CONSTRUCTORS/DESTRUCTOR:
Monomer::Monomer(unsigned int mI, unsigned int mO) : Component(mI, mO) 
{ PRINT_NAME; }

Monomer::Monomer(const Monomer& orig)
{
  PRINT_NAME;
  this->copy(orig);  
}

Monomer::~Monomer()
{ 
  PRINT_NAME;
  if ( hasSuperior() )
    {
      getSuperior().removeComponent(this);
      setSuperior(NULL);
    }
} 


// PREDICATES:

// MODIFIERS:

void 
Monomer::copy(const Monomer& orig)
{
  PRINT_NAME; 

  // Monomer::copy() needs fixing!

  // using Component::copy(orig) causes a segmentation fault
  // instead copy relevant sections by hand:

  // copy bounding box:
//    this->lowerBound = orig.lowerBound;
//    this->upperBound = orig.upperBound;

}

Component* 
Monomer::clone()
{
  return new Monomer;
}

// OPERATORS:

// HELPERS:


// -*- C++ -*-----------------------------------------------------------------
//
//  Method:        <Name>
//
//  Class:         <ClassName>
//  
//  Author:        <Name> 
//
//  Project Name:  Victor
//
//  Date:          mm/yy
//
//  Reviewed By:   <Name>
//
//  Description:
//    <Description>
//
// ----------------------------------------------------------------------------

